﻿using DotNetMVC.DTO;
using DotNetMVC.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DotNetMVC.IService
{
    public partial interface ISiteContentService : IBaseService<SiteContent>
    {
        SiteContentDTO GetDTOById(long id);


        SiteContentDTO[] GetDTOPagedData(long navId, out long total, int pageIndex, int pageSize);

        /// <summary>
        /// 通过菜单Id 获取数据
        /// </summary>
        /// <param name="navId"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        SiteContentDTO[] GetDTOByNavId(long navId);

        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="navId">菜单Id</param>
        /// <param name="count">获取条数</param>
        /// <returns></returns>
        SiteContentDTO[] GetDTOByNavId(long navId,int count);

        /// <summary>
        /// 通过功能分类代码获取数据
        /// </summary>
        /// <param name="funCode"></param>
        /// <returns></returns>
        SiteContentDTO[] GetDTOByFunCode(string funCode);

        #region 介绍页
        SiteContent GetInfoByNavId(long navId);
        SiteContentDTO GetInfoDTOByNavId(long navId);

        void UpdateInfo(long id, string cont);
        #endregion

        #region 新闻资讯
        SiteContent AddNews(long siteNavId, string title, DateTime submitDate, string cont, string imgLG, int sort);
        void UpdateNews(long id, string title, DateTime submitDate, string cont, string imgLG, int sort);
        #endregion

        #region 资料下载
        SiteContent AddDownload(long siteNavId, string title, DateTime submitDate, string downloadFile, string imgLG, int sort);
        void UpdateDownload(long id, string title, DateTime submitDate, string downloadFile, string imgLG, int sort);
        #endregion

        #region 友情链接
        SiteContent AddLink(long siteNavId, string title,  string linksUrl, string listLinksTarget, string imgLG, int sort);
        void UpdateLink(long id, string title,  string linksUrl, string listLinksTarget, string imgLG, int sort);
        #endregion        
        
        #region 图片展示
        SiteContent AddImage(long siteNavId, string title,  string linksUrl, string listLinksTarget, string imgLG, int sort);
        void UpdateImage(long id, string title,  string linksUrl, string listLinksTarget, string imgLG, int sort);
        #endregion

        void Add( long siteNavId ,string fileName , string title , DateTime submitDate,string cont ,string linksUrl , string downloadFile ,string imgLG ,int sort);
        void Update(long id, long siteNavId, string fileName, string title, DateTime submitDate, string cont, string linksUrl, string downloadFile, string imgLG, int sort);
    }
}
